﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Kea
{
    public class DataPlanStart<T> : DataPlanSeekable<T> where T : TableReaderWriter<T>, new()
    {
        internal DataPlanStart() { }

        public DataPlanSeekable<T> WithIndex(string indexName)
        {
            return new DataPlanSeekable<T>()
            {
                Filters = Filters,
                Comparer = Comparer,
                IndexName = indexName,
                IndexValuesLowerLimit = IndexValuesLowerLimit,
                IndexValuesUpperLimit = IndexValuesUpperLimit
            };
        }
        public DataPlanSeekable<T> WithIndex(string indexName, params object[] indexValues)
        {
            return new DataPlanSeekable<T>()
            {
                Filters = Filters,
                Comparer = Comparer,
                IndexName = indexName,
                IndexValuesLowerLimit = indexValues,
                IndexValuesUpperLimit = indexValues
            };
        }
    }
}
